import 'package:get/get.dart';
import 'navigation_controller.dart';
import '../home/landing_page_controller.dart';
import '../communal/community_page_controller.dart';
import '../chat/messaging_page_controller.dart';
import '../my/profile_page_controller.dart';
import '../../function/state/user_state.dart';
import '../../function/state/post_state.dart';
import '../../function/state/like_state.dart';
import '../../function/state/comment_state.dart';
import '../../function/state/follow_state.dart';
import '../../function/state/ai_chat_state.dart';
import '../../function/state/plant_record_state.dart';
import '../../function/state/plant_encyclopedia_state.dart';
import '../../function/state/chat_group_state.dart';
import '../../function/state/chat_message_state.dart';
import '../../function/state/single_chat_state.dart';
import '../../function/state/single_chat_message_state.dart';

/// 主页面绑定
/// 初始化主页面控制器和所有子页面控制器
class PrimaryScreenBinding extends Bindings {
  @override
  void dependencies() {
    // 注册全局状态管理
    Get.put(UserState(), permanent: true);
    Get.put(PlantRecordState(), permanent: true);
    Get.put(PlantEncyclopediaState(), permanent: true);
    Get.put(FollowState(), permanent: true);
    Get.put(PostState(), permanent: true);
    Get.put(LikeState(), permanent: true);
    Get.put(CommentState(), permanent: true);
    Get.put(AiChatState(), permanent: true);
    Get.put(ChatGroupState(), permanent: true);
    Get.put(ChatMessageState(), permanent: true);
    Get.put(SingleChatState(), permanent: true);
    Get.put(SingleChatMessageState(), permanent: true);

    // 注册主页面控制器
    Get.put(PrimaryScreenController());

    // 注册所有子页面控制器
    Get.put(LandingPageController());
    Get.put(CommunityPageController());
    Get.put(MessagingPageController());
    Get.put(ProfilePageController());
  }
}
